package com.emep.changzhi.analyse.repository.datamonitor;

import com.emep.changzhi.analyse.entity.datamonitor.DataDroppedRecord;
import com.emep.changzhi.analyse.entity.error.AirQuality;
import org.springframework.data.cassandra.repository.Query;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @author yangj
 * @version V1.0
 * @Description: 掉线记录持久层
 * @date 2018/2/26  17:00
 */
public interface DataDroppedRepository extends CrudRepository<DataDroppedRecord , Long> {
    @Query("select * from data_dropped_record limit :pageSize")
    List<DataDroppedRecord> dataDroppedRecordHome(@Param("pageSize") Integer pageSize);
    @Query("select * from data_dropped_record where token(id)>token(:id) limit :pageSize")
    List<DataDroppedRecord> dataDroppedRecordFlip(@Param("id")String id,@Param("pageSize") Integer pageSize);
}
